using System;
using System.IO;
using System.Text;
using System.Windows;
using Qplus.beans;

namespace Qplus.Commands
{

    /**
     *
     *
     */
    public class GetUserCommand : AbsHeaderHttpCommand , HttpInputStreamProcessor{

	    const String COMMAND = "GetUser";
	
	    QUser user;
        
	    /**
	     * @param command
	     * @param uid
	     * @param UKEY
	     */
        public GetUserCommand(String uid, String UKEY)
            : base(COMMAND, uid, UKEY)
        {
		    
	    }
	    //Observer o;
	    /**
	     * @param command
	     * @param uid
	     * @param UKEY
	     */
        public GetUserCommand(long uid, byte[] UKEY, QUser user)
            : base(COMMAND, uid.GetType().ToString(), Encoding.UTF8.GetString(UKEY, 0, 32))
        {
		    this.user = user;
		   
	    }

	    public HttpTask execute(String url) {
		    return base.execute(url, this);
	    }

	    
	    public override Boolean processInputStream(Stream responseStream) {
		    //TODO
            return true;
	    }

	    
	    public override void onSuccess(int code) {
	    }


        public override void onFailed(int code)
        {
	    }
    }
}
